# Maintainer: Laurent Carlier <lordheavym@gmail.com>

pkgname=libepoxy
pkgver=1.5.9
pkgrel=1
pkgdesc="Library handling OpenGL function pointer management"
url="https://github.com/anholt/libepoxy"
arch=(x86_64)
license=(MIT)
depends=(glibc)
makedepends=(python mesa-libgl git meson doxygen graphviz)
checkdepends=(xorg-server-xvfb)
_commit=ecfa8e0f083084181d36966fa084aca9a6c97d53  # tags/1.5.9^0
source=("git+https://github.com/anholt/libepoxy#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build -D docs=true
  meson compile -C build
}

check() {
  xvfb-run -s '-nolisten local' \
    meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
  install -Dm644 $pkgname/COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

# vim:set sw=2 et:
